<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="MproductBuyadd.aspx.cs" Inherits="MproductBuyadd" %>

<%@ Register Src="usercontrols/MainMenu.ascx" TagName="MainMenu" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <!-- top-->
    <!-- Content general begin-->
    <div class="content_general">
        <!-- Left main begin-->
        <uc1:MainMenu ID="MainMenu1" runat="server" />
        <!-- Left main -->
        <!-- Left right main begin-->
        <div class="fl left_right_main">
            <div style="font-size: 20px" class="red">
                Post a new buying lead</div>
            <div class="form_post_sell mt_10px">
                <div class="post_new_product_title">
                    Tell Suppliers what you want to buy</div>
                <div class="formrow">
                    <div class="lb_medium right fl">
                        Buying Lead Headline:
                    </div>
                    <div class="form_general_right1 form_note ">
                        <div class="form_general_right1 form_note">
                            <input name="" type="text" class="textbox_medium fl" id="txtName" runat="server" />
                            <span class="red1">(*)</span>
                            <div class="form_general_right1 form_note">
                                e.g. "Leather Gloves Wanted"</div>
                        </div>
                    </div>
                    <div class="clr">
                    </div>
                </div>
                <div class="formrow">
                    <div class="lb_medium right fl">
                        Product Keywords:</div>
                    <div class="form_general_right1 form_note ">
                        <div class="form_general_right1 form_note">
                            <input name="" type="text" class="textbox_medium fl" id="txtproductkey" runat="server" />
                            <span class="red1">(*)</span><%-- <span><a href="#" class="bold">Add more</a></span>--%>
                            <div class="form_general_right1 form_note">
                                Enter one Product Keyword only - e.g. "Mountain Bike"</div>
                        </div>
                    </div>
                    <div class="clr">
                    </div>
                </div>
                <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                    <ContentTemplate>
                        <div class="formrow">
                            <div class="lb_medium right fl">
                                Product Category:
                            </div>
                            <asp:DropDownList ID="ddlProCat" CssClass="select_medium fl" runat="server" OnSelectedIndexChanged="ddlProSubCat_OnSelectedIndexChanged"
                                AutoPostBack="true">
                            </asp:DropDownList>
                            <span class="red1">(*)</span>
                            <div class="clr">
                            </div>
                        </div>
                        <div class="formrow">
                            <div class="lb_medium right fl">
                                Subcategory:
                            </div>
                            <asp:DropDownList ID="ddlSubCat" CssClass="select_medium fl" runat="server" OnSelectedIndexChanged="ddlSubCat_OnSelectedIndexChanged"
                                AutoPostBack="true">
                            </asp:DropDownList>
                            <span class="red1">(*)</span>
                            <div class="clr">
                            </div>
                        </div>
                        <div class="formrow">
                            <div class="lb_medium right fl">
                                Sub SubCategory:
                            </div>
                            <asp:DropDownList ID="ddlSubSubCat" CssClass="select_medium fl" runat="server">
                            </asp:DropDownList>
                            <span class="red1">(*)</span>
                            <div class="clr">
                            </div>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
                <div class="formrow">
                    <div class="lb_medium right fl">
                        Brief Description:</div>
                    <div class="form_general_right1 form_note ">
                        <div class="form_general_right1 form_note">
                            <textarea name="textarea" class="fl textarea" id="txtBriefDescription" runat="server"
                                style="height: 50px; width: 550px;"></textarea>
                            <div class="form_general_right1 form_note">
                                <span class="red1">
                                    <div id="divBriefDescription">
                                    </div>
                                </span>
                            </div>
                        </div>
                    </div>
                    <div class="clr">
                    </div>
                </div>
                <div class="formrow">
                    <div class="lb_medium right fl">
                        Contact Options:
                    </div>
                    <div class="form_general_right1 form_note ">
                        <div class="form_general_right1 form_note">
                            <%--<input name="" type="radio" value="" class="radio fl" />--%>
                            <asp:RadioButton ID="rdocontacotion1" CssClass="radio fl" GroupName="1" runat="server" />
                            <div class="fl text_normal">
                                Allow my full contact details to be viewed by all members (More responses)
                            </div>
                            <div class="form_general_right1 form_note">
                                <%--<input name="" type="radio" value="" class="radio fl" />--%>
                                <asp:RadioButton ID="rdocontacotion2" CssClass="radio fl" GroupName="1" runat="server" />
                                <div class="fl text_normal">
                                    Allow contact by <strong>Message Center only</strong></div>
                            </div>
                            <div class="form_general_right1 form_note">
                                <%--<input name="" type="radio" value="" class="radio fl" />--%>
                                <asp:RadioButton ID="rdocontacotion3" CssClass="radio fl" GroupName="1" runat="server" />
                                <div class="fl text_normal">
                                    Allow <strong>only Gold Suppliers</strong> to view my contact details</div>
                            </div>
                        </div>
                    </div>
                    <div class="clr">
                    </div>
                </div>
                <div class="formrow">
                    <div class="lb_medium right fl">
                        Expire After:
                    </div>
                    <%--<select name="" class="select_medium fl">
                        <option>2 month</option>
                    </select>--%>
                    <asp:TextBox CssClass="select_medium fl" ID="txtExpireDate" runat="server" Width="150"></asp:TextBox><img
                        src="images/calendar_icon.gif" border="0" align="absmiddle" onclick="displayDatePicker(document.getElementById('<%=txtExpireDate.ClientID%>').name , false,'<%=RTISettings.FormatDateToCalendar%>','/');" />
                    <asp:CustomValidator ID="cusDate" runat="server" ControlToValidate="txtExpireDate"
                        ClientValidationFunction="ClientValidationDateTime">*</asp:CustomValidator>
                    <span class="red1">(*)</span>
                    <div class="clr">
                    </div>
                </div>
                <div class="post_new_product_title mt_20px">
                    Add Extra Product Details & Specifications</div>
                <div class="formrow mt_5px">
                    <div class="lb_medium right fl">
                        Product Photo:</div>
                    <img src="images/img_photo.jpg" id="img" runat="server" width="100" height="99" class="fl" /><div
                        class="fl" style="width: 280px; margin-left: 10px;">
                        <%--<input type="button" value="Browse" style="width: 150px;" />--%>
                        <asp:FileUpload ID="FULImg" runat="server" />
                        <br />
                        <%--<input type="button" value="Delete" style="width: 150px;" />--%>
                        <asp:Button ID="btnDelete" runat="server" Text="Delete" OnClick="Button1_Click" />
                        <p class="form_note">
                            <span class="red1">500K</span> max. <span class="red1">JPEG(.jpg)</span> format
                            only</p>
                    </div>
                    <div class="clr">
                    </div>
                </div>
                <div class="formrow">
                    <div class="lb_medium right fl">
                        Detailed Description:
                    </div>
                    <div class="form_general_right1 form_note ">
                        <div class="form_general_right1 form_note">
                            <textarea name="textarea" class="fl textarea" id="txtDetailedDescription" runat="server"
                                style="height: 100px; width: 550px;"></textarea>
                            <div class="form_general_right1 form_note">
                                <span class="red1">
                                    <div id="divDetailedDescription">
                                    </div>
                                </span>
                            </div>
                        </div>
                    </div>
                    <div class="clr">
                    </div>
                </div>
                <div class="formrow ">
                    <div class="lb_medium right fl">
                        Price Range:
                    </div>
                    <%-- <select class="select fl">
                    <option>-- Curency --</option>
                </select>--%>
                    <asp:DropDownList ID="ddlCurency" runat="server" CssClass="select fl" Width="135">
                    </asp:DropDownList>
                    <%--<input type="text" class="textbox fl" style="width: 135px;" value="Lowest amount here" />--%>
                    <input type="text" value="Lowest amount here" name="q" onkeyup="this.value = FormatNumber(this.value);"
                        runat="server" onkeydown="return processKey(event)" onfocus="if(this.value=='Lowest amount here') this.value='';"
                        onblur="if(this.value=='') this.value='Lowest amount here';" class="textbox fl"
                        id="txtLowest" style="width: 135px;" />
                    <%--<input type="text" class="textbox fl" style="width: 134px;" value="Highestt amount here" />--%>
                    <input type="text" value="Highestt amount here" name="q" onkeyup="this.value = FormatNumber(this.value);"
                        runat="server" onkeydown="return processKey(event)" onfocus="if(this.value=='Highestt amount here') this.value='';"
                        onblur="if(this.value=='') this.value='Highestt amount here';" class="textbox fl"
                        id="txtHighestt" style="width: 135px;" />
                    <div class="clr">
                    </div>
                </div>
                <div class="formrow ">
                    <div class="lb_medium right fl">
                        Quantity Required:</div>
                    <%--<input type="text" class="textbox_small fl" value="Enter quantity you want to buy" />--%>
                    <input type="text" value="Enter quantity you want to buy" name="q" onkeyup="this.value = FormatNumber(this.value);"
                        runat="server" onkeydown="return processKey(event)" onfocus="if(this.value=='Enter quantity you want to buy') this.value='';"
                        onblur="if(this.value=='') this.value='Enter quantity you want to buy';" class="textbox_small fl"
                        id="txtquantity" />
                    <%--<select class="select fl" style="width: 170px;">
                        <option>-- Select Unit type --</option>
                    </select>--%>
                    <asp:DropDownList ID="ddlUnittype1" runat="server" CssClass="select fl" Width="170">
                    </asp:DropDownList>
                    <div class="clr">
                    </div>
                </div>
                <div class="formrow">
                    <div class="lb_medium right fl">
                        Required Certification:
                    </div>
                    <div class="form_general_right1 form_note ">
                        <div class="form_general_right1 form_note">
                            <textarea name="textarea" class="fl textarea" id="txtRequiredCertification" runat="server"
                                style="height: 50px; width: 550px;"></textarea>
                            <div class="form_general_right1 form_note">
                                <span class="red1">
                                    <div id="divRequiredCertification">
                                    </div>
                                </span>
                            </div>
                        </div>
                    </div>
                    <div class="clr">
                    </div>
                </div>
                <div class="mt_10px" style="padding-left: 160px;">
                    <%--OnClientClick="return CheckValue()"--%>
                    <%--<input type="submit" name="Submit2" value="Submit" class="sub_mit fl" />--%>
                    <asp:Button ID="Button1" CssClass="sub_mit fl" CausesValidation="true" runat="server"
                        OnClick="ltbfinish_OnClick" OnClientClick="return CheckValue()" Text="Submit" />
                    <%--<a href="#" class="btn_general fl" style="margin-left: 10px;"><span class="fl">PREVIEW
                    </span></a>--%>
                    <div class="clr">
                    </div>
                </div>
                <div class="clr">
                </div>
            </div>
        </div>
    </div>
    <!-- Left right main -->
    <div class="clr">
    </div>

    <script type="text/javascript">
        fieldlimiter.setup({
	        thefield: document.getElementById("<%=this.txtBriefDescription.ClientID%>"), //reference to form field
	        maxlength: 128,
	        statusids: ["divBriefDescription"], //id(s) of divs to output characters limit. If non, set to empty array [].
	        onkeypress:function(maxlength, curlength){ //onkeypress event handler
		        //define custom event actions here if desired
	        }
        })
    </script>

    <script type="text/javascript">
        fieldlimiter.setup({
	        thefield: document.getElementById("<%=this.txtDetailedDescription.ClientID%>"), //reference to form field
	        maxlength: 800,
	        statusids: ["divDetailedDescription"], //id(s) of divs to output characters limit. If non, set to empty array [].
	        onkeypress:function(maxlength, curlength){ //onkeypress event handler
		        //define custom event actions here if desired
	        }
        })
    </script>

    <script type="text/javascript">
        fieldlimiter.setup({
	        thefield: document.getElementById("<%=this.txtRequiredCertification.ClientID%>"), //reference to form field
	        maxlength: 500,
	        statusids: ["divRequiredCertification"], //id(s) of divs to output characters limit. If non, set to empty array [].
	        onkeypress:function(maxlength, curlength){ //onkeypress event handler
		        //define custom event actions here if desired
	        }
        })
    </script>

    <script type="text/javascript">
            function CheckValue()
            {                               
                 var ddlProCat=document.getElementById("<%=ddlProCat.ClientID%>");
                 var ddlSubCat=document.getElementById("<%=ddlSubCat.ClientID%>");
                 var ddlSubSubCat=document.getElementById("<%=ddlSubSubCat.ClientID%>");                 
                 var txtName=document.getElementById("<%=txtName.ClientID%>");
                 var txtKey=document.getElementById("<%=txtproductkey.ClientID%>");
                 var txtExpireDate=document.getElementById("<%=txtExpireDate.ClientID%>");
                 if(txtName.value=='')
                 {
                    alert('Buying Lead Headline is not Null !');
                    return false;
                 }                 
                 if(txtKey.value=='')
                 {
                    alert('Keyword is not Null !');
                    return false;
                 }
                 if(ddlProCat.value=='0')
                 {
                    alert('Category is not Null !');
                    return false;
                 }                 
                 if(ddlSubCat.value=='0')
                 {
                    alert('SubCategory is not Null !');
                    return false;
                 }
                 if(ddlSubSubCat.value=='0')
                 {
                    alert('SubsubCategory is not Null !');
                    return false;
                 }
                 if(txtExpireDate.value=='')
                 {
                    alert('Expire After Date is not Null !');
                    return false;
                 }               
            }            
    </script>

</asp:Content>
